<template>
	<div :class="{ control__empty: true, control__error: errorStatus }">
		<van-empty
			image="network"
			:description="
				!errorStatus
					? emptyText
						? emptyText
						: $t('app.warn.nofind', '未找到相关数据')
					: $t('widget.md.errortext', '请求失败')
			"
		>
			<template #image v-if="!errorStatus">
				<img class="empty__img" src="@/assets/img/empty-data.png" />
			</template>
		</van-empty>
	</div>
</template>
<script setup lang="ts">
import { emptyDataTipProps } from './empty-data-tip';
defineProps(emptyDataTipProps);
</script>
